<template>
	<view class="">
		<!--  -->
		<ben></ben>
		<!--  -->
		<view class="min30_rl mintop40 col0 font500 size26 align_item_b row">
			团队总额
			<view class="size36 font600 minleft10" style="color: #FE3C3C;">
				{{ total_forehead }}
			</view>
		</view>
		<view class="box rad2 min30 pad10 row">
			<view class="colf font500 size26 flex1 minleft30">
				<view class="mintop40">
					恭喜您达到团队返点条件
				</view>
				<view class="mintop40 row align_item_c">
					<view class="font600 size36">
						20,000
					</view>
					积分已到达账户
				</view>
			</view>
			<image src="@/static/image/51.png" class="minright30 minbottom30" style="height: 180rpx;width: 200rpx;">
			</image>
		</view>
		<view class="min30_rl">
			<view class="text_center size26" style="color: #7B7F88;">
				团队返点规则说明
			</view>
			<view class="">
				<mp-html :content="html" />
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				html: '',
				total_forehead: '',
			}
		},

		onLoad() {
			this.user_id = uni.getStorageSync('user_id');
			this.getAgreement()
			this.getTeamTotal()
		},
		methods: {
			async getTeamTotal() {
				let {
					code,
					message,
					data
				} = await this.$com.fetchGet("member/total_forehead/" + this.user_id)
				if (code == 200) {
					this.total_forehead = data
			
				} else {
					console.log(message);
				}
			},
			async getAgreement() {
				let {
					code,
					message,
					data
				} = await this.$com.fetchGet("home/agreement")
				if (code == 200) {
					this.html = data.rule_description

				} else {
					console.log(message);
				}
			},
		}
	}
</script>

<style scoped lang="less">
	.box {
		background: linear-gradient(63deg, #FF515E 0%, #FF7F3E 100%), linear-gradient(167deg, #FF6B4A 0%, rgba(255, 123, 77, 0) 100%);
	}
</style>